package com.mall.client.search;

import java.util.List;

import com.mall.pojo.SaleEshop;
import com.mall.query.search.EshopSearchQuery;
import com.mall.searchdo.SearchResultIdDO;

public interface EShopLuceneBuildService {

	public List<SearchResultIdDO> searchEshopFromLucene(EshopSearchQuery eshopSearchQuery, String searchDir, int num);

	/**
	 * 新建搜索
	 * 
	 * @param saleEshopList
	 * @param eshopSearchDir
	 */
	public Boolean buildAll(List<SaleEshop> saleEshopList, String eshopSearchDir);

	/**
	 * 删除所有索引
	 * 
	 * @param eshopSearchDir
	 */
	public void deleteAll(String eshopSearchDir);

	/**
	 * 更新索引
	 * 
	 * @param saleEshopList
	 * @param eshopSearchDir
	 * @throws Exception
	 */
	public void update(List<SaleEshop> saleEshopList, String eshopSearchDir);
	
	/**
	 * 删除索引
	 * 
	 * @param ids
	 * @param eshopSearchDir
	 * @throws Exception
	 */
	public void deleteByIds(List<Long> ids, String eshopSearchDir);
}
